# Makefile DMC Win.

CC = dmc
DC = dmd
LIBR = lib

CSRC = c

CFLGS	= -I. -DTHREADSAFE=0 -DSQLITE_DISABLE_LFS
CFLGSR	= $(CFLGS) -o
CFLGSD	= $(CFLGS) -g -D 
#-DSQLITE_DEBUG -DSQLITE_MEMDEBUG 

DSRC = all.d pub.d Base.d Data.d Extra.d c/sqlite3.d 

ALL: sqlite3d.lib sqlite3d-d.lib clean

dbi8.obj: $(CSRC)\sqlite3.c
	$(CC) $(CFLGSR) -c $(CSRC)\sqlite3.c -odbi8.obj
	
sqlite3d.lib: $(DSRC) dbi8.obj
	$(DC) -O -release -inline dbi8.obj $(DSRC) -lib -ofsqlite3d

dbi8d.obj: $(CSRC)\sqlite3.c
	$(CC) $(CFLGSD) -c $(CSRC)\sqlite3.c -odbi8d.obj

sqlite3d-d.lib: $(DSRC) dbi8d.obj
	$(DC) -g -debug -unittest dbi8d.obj $(DSRC) -lib -ofsqlite3d-d -version=SQLITE_SAFE -version=PRINT_MIXIN

clean:
	del *.bak
